#ifndef _KOZOS_IPC_H_INCLUDED_
#define _KOZOS_IPC_H_INCLUDED_

#include "defines.h"
#include "kernel.h"
#include "syscall.h"

void ipc_init();
kz_msgbox_id_t msgbox_get();
void msgbox_free(kz_msgbox_id_t id);
kz_thread *sendmsg(kz_msgbox_id_t id, kz_thread *sender, int size, char *p);
kz_thread_id_t recvmsg(kz_msgbox_id_t id, kz_thread *receiver);
int msgbox_arrived(kz_msgbox_id_t id, kz_thread *receiver);
int msgbox_setreceiver(kz_msgbox_id_t mb, kz_thread *receiver);

#endif
